home *** CD-ROM | disk | FTP | other *** search
-
- import java.awt.*;
-
- public class LinkButton extends java.applet.Applet {
- URL url;
-
- public void init() {
- String lbl = getParameter("lbl");
- if (lbl == null) {
- lbl = "link";
- }
- try {
- String str = getParamter("href");
- if (str != null) {
- url = new URL(str);
- }
- } catch (MalformedURLException e) {
- }
-
- setFont(new Font("Helvetica", Font.BOLD, 14));
- setLayout(new BorderLayout());
- add("Center", new Button(lbl));
- }
- public boolean action(Event evt, Object arg) {
- System.out.println("YES: " + arg);
-
- return true;
- }
- }
-